<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入博客样式 -->
    <link rel="stylesheet" href="commonCSS/blog.css">
</head>

<body>
    <h2>需求描述</h2>
    <p>增加科室编码，编码自动生成，编码规则科室缩写-年份-编号（取3位数)</p>

    <h3>entity-*.xml</h3>
    <h4>entity-jzjcsc-bill.xml TB_CON_JZJC_CONTRACT_PAY、entity-mzContract-bill.xml TB_CON_CONTRACT_INC TB_CON_CONTRACT_TRAN
    </h4>
    <p>
        <span class="code">
            &lt;field name="dep_code" type="char-32" description="科室编号"/&gt;
        </span>
    </p>

    <h3>*Entity.java</h3>
    <h4>jzjcsc JzjcContractPayEntity.java、mzContract ContractIncEntity.java ContractTranEntity.java</h4>
    <p>
        <span class="code">
            /** 科室编码 */
            public String getDepCode() {
            return getStr("dep_code");
            }

            /** 科室编码 */
            public void setDepCode(String dep_code) {
            put("dep_code", dep_code);
            }
        </span>
    </p>

    <h3>com.oneheart.xp.plugin.zzzx.zzzxContractPay.ZzzxContractPayCardService#editAfter</h3>
    <p>
        <span>
            String id = param.getStrIgnoreNull("id");
            if (UtilPub.isEmptyId(id)) {
                String curNumber = new CodeHandler().getCurNumber(context.getLoginInfo().getNowyear(), "zzzx_contarct_pay_dep_code");
                String pinYinHeadChar = UtilPinyin.getPinYinHeadChar(DepartmentEntityBuffer.getInstance().getNameById(context.getLoginInfo().getCurDepartmentId()));
                String depCode = pinYinHeadChar + "-" + context.getLoginInfo().getNowyear() + "-" + curNumber;
                map.put("dep_code", depCode);
            }
        </span>
    </p>

    <h3>contract_zzzx_card_base.jsp</h3>
    <p>
        <span>
            <td nowrap class="p_td_bill_lbl">科室编码：</td>
            <td nowrap class="dfp_txt">
                <input type="text" id="dep_code" name="dep_code"
                       tabIndex="<%=tabIndex++%>"
                       class="dfp_input" disabled
                       value="<%=UtilPub.checkNull(bean.billEntity.getDepCode())%>" />
            </td>
        </span>
    </p>


    <p></p>




</body>

</html>